package fw.mvc.listener;

import java.io.File;
import java.io.IOException;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

import fw.mvc.config.ConfigMap;

public class MvcServletContextListener implements ServletContextListener {

	@Override
	public void contextDestroyed(ServletContextEvent sce) {
	}

	@Override
	public void contextInitialized(ServletContextEvent sce) {
		String packageName = sce.getServletContext().getInitParameter("scanPackage");
		try {
			ConfigMap.init(packageName);
			System.out.println(ConfigMap.getInstance());
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

}
